<template>
    <div>
      <div class="demo"></div>
    </div>
</template>
  
<script setup lang='ts'>
import {onMounted} from 'vue'
  const setRem = () => {
    const width = document.documentElement.clientWidth
    console.log(width)
    const remWidth = width/750
    console.log(remWidth)
    document.documentElement.style.fontSize=remWidth +'px'
  }
  onMounted(() => {
    // setRem()
  })
</script>
  
<style lang="scss">
  .demo{
    width: 500px; //5rem
    height: 150px;
    background:#87c1ed;
  }
</style>